﻿using HiSportApplet.Core.Enum;
using SqlSugar;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;


namespace HiSportApplet.Core.Entity.Member
{

    /// <summary>
    /// 系统会员
    /// </summary>
    [SugarTable(null, "系统会员表")]
    [SysTable]
    public class SysMember : EntityBase
    {
        [SugarColumn(ColumnDescription = "会员名称", Length = 20)]
        [Required, MaxLength(20)]
        public string Name { get; set; }

        [SugarColumn(ColumnDescription = "头像", Length = 512)]
        [Required, MaxLength(512)]
        public string HeadUrl { get; set; }

        [SugarColumn(ColumnDescription = "性别")]
        public GenderEnum Sex { get; set; }


        [SugarColumn(ColumnDescription = "生日")]
        public DateTime? Birthday { get; set; }

        [SugarColumn(ColumnDescription = "手机号", Length = 20, DefaultValue = "")]
        [Required, MaxLength(20)]
        public string Phone { get; set; }


        [SugarColumn(ColumnDescription = "OpenId", Length = 128)]
        [Required, MaxLength(128)]
        public string OpenId { get; set; }

    }
}
